﻿/*
 * NetUdpServer.h
 */
#ifndef __GDK_NETUDPSERVER_H__
#define __GDK_NETUDPSERVER_H__

#include <gdk/core/EventDispenser.h>
#include <gdk/net/Socket.h>
#include <gdk/net/UdpServer.h>


namespace gdk
{

	class GDK_NET_EXPORT NetUdpServer : public UdpServer
	{
		DECLARE_CLASS_HANDLE(NetUdpServer)
		DECLARE_CLASS_INSTANCE(NetUdpServer)

	private:
		EventDispenser	_eventDispenser; //事件处理器

	private:
		NetUdpServer(void);
		~NetUdpServer(void);

	protected:
		virtual void  onAccept(void);

	public:
		__INLINE__ EventDispenser& getEventDispenser(void) { return _eventDispenser; }
		//--------------------------------------------
	};
	typedef NetUdpServer::Handle NetUdpServerPtr;


} //namespace gdk


#endif //__GDK_NETUDPSERVER_H__
